Davar4: MDK - Preparation of writing modules |
Writings are modules similar to lexicones, but with more flexible format. User selects records from combo box. Keys can be following types: word text as key (Latin, Hebrew, Greek) or Strong# as key word , gematrical value as key word or reference key word. Writing data format is used also for user notes by setting D4_UserNotes to value 1 in info.txt
Writing can have up to 10 headings, where can be used various tags (e.g. Hebrew or Greek texts, Strong#, references, PDF references etc..)
Below headings, there is description text area, where tags can be used.
Writing modules are SQLite3 database files. You can also open .dwr (or .not for notes) file in database browser to edit.
Also, it is possible to use writing module as all "library" with many different texts. For example module "Extra Biblical texts" which collects many different texts.
It is recommended to use first heading area (if headings are used) with writing key (e.g. with Word label)
There are two programs for preparation of writing modules. Both needs two input files: data.txt and info.txt. File info.txt contains definition of writing structure (number and type of the headers etc.) and this define structure must be followed in data.txt. Most items in info.txt was explained in preparation of book section, please look there too.
Following programs are for conversion to writing module:
d4dwr.exe is program for creation of all writing modules. See Example4 - STRIPD_HE as DWR
d4dwrtxt.exe is program, which simplify creation of writing "library" with many texts. In case when you have big plain text and want to quickly prepare writing "library" module, you can use it. See Example5 - Imitation of Christ as DWR text.
This is an example, which you will find in MDK folder. After compilation of module, you can move prepared dwr file to data folder, start Davar4 and open this module.
Writing module (Imitation of Christ): Selected part of text from data.txt are inserted into combo box as labels. This parts of text can be long and correspond to "chapters" or "books" or "letters" or any other division. User can select from combo part of text to display.
Example of info.txt file used in Example5 - Imitation of Christ as DWR text (blue, bold) , next line (red) is commentary and explanation (not a part of file!). All red commentaries also starts here by ; character - thus you can copy and paste to editor all section below and use it as template for your module.
;THIS FILE MUST BE UTF-8, Little Endian, without Byte Order Mark. New line is CR+LF pair D4_Version_Major=1 D4_OutputFile=imch_en.dwr ;above are inserted same data as in lexicones and books, look to links to study D4_UserNotes=0 ;use 0 for writings, notes are created with value=1 (=able to edit in note editor)
;in this case, key is NOT reference and we do NOT use any references in text. Thus, we do not need info about books.
;Type of key or headers:0=Latin,1=HE,2=GR texts, ;key for this module is latin based text (=0)
;specification of main language and sublanguage. We use standard Windows
D4_Headers=0 ;NOTE: we do NOT have any headers (which are common for all records). Each record is unique text. ;here can be used 0-9 headers. Not used can be omitted ;first character on line is ; thus lines above are ignored
D4_Tags=0 ;Tag flags: 0=tag not used,1=tag is used and default visible,3=tag is used and default invisible | ;in the case of Imitation of Christ, we use just plain text without tags. It is possible to insert any combinations of tags, if required and set values to 1.
D4_JumpInside=0
|
IMPORTANT: for d4dwrtxt.exe convertor, file data.txt has different structure:
Each text line, starting by @@ (2 times at character), all line is recognized as label and put into combo box as label of new section.
All text from the next line to next @@ marker (or end of file) will be assigned to this section.
Use common line breaks in editor -no need to have one record per line (and thus use |C or |TL tags as line break).
This simple rules allows you to create data.txt file from any text source which you have in text editor. Remember, starting line with @@ characters cannot be inside of text, because is used as label. That is reason, why rare combination of @@ was selected. Also, breaking of lines will be according text in editor, as usual.
Below is shortened start of Imitation of Christ. Notes following on next line are in red color
@@Title and Contents ^ this line starts by @@ characters and will be put into combo as first label: Title and Contents
Imitation of Christ ^ here starts text, which will be in first record. it is good rule to repeat label for user orientation in text. Thomas Kempis ^ this is last line of first record
@@I. - 1. Imitating Christ and Despising All Vanities on Earth ^ this line starts by @@ characters and will be put into combo as second label: I. - 1. Imitating Christ and Despising All Vanities on Earth BOOK ONE The First Chapter Imitating Christ and Despising All Vanities on Earth HE WHO follows Me, walks not in darkness," says the Lord.[1] By these words of Christ we are advised to imitate His life and habits, if we wish to be truly enlightened and free from all blindness of heart. Let our chief effort, therefore, be to study the life of Jesus Christ. ^ this is last line of second record @@I. - 2. Having a Humble Opinion of Self ^ this line starts by @@ characters and will be put into combo as third label: I. - 2. Having a Humble Opinion of Self The Second Chapter Having a Humble Opinion of Self EVERY man naturally desires knowledge; but what good is knowledge without fear of God? Indeed a humble rustic who serves God is better than a proud intellectual who neglects his soul to study the course of the stars. He who knows himself well becomes mean in his own eyes and is not happy when praised by men. @@I. - 3. The Doctrine of Truth ...etc till the end of file
|
This is an example, which you will find in MDK folder. After compilation of module, you can move prepared dwr file to data folder, start Davar4 and open this module.
This module demonstrates to use writing module for data, used also in lexicon (STRIPD_HE lexicone was the primary module).
Example of STRIPD_HE writing module: Hebrew text as key (in combo box) and 6 headings with various tags, below is description text area
;THIS FILE MUST BE UTF-8, Little Endian, without Byte Order Mark. New line is CR+LF pair D4_Version_Major=1 D4_OutputFile=stripd_he.dwr D4_UserNotes=0 ;note: there are not books, because this module has no references ;NOT NEEDED! #records is detected in compilation D4_Records=8854 ;note: present versions of convertors does NOT need know number of records - detection is in compilation time ;Type of key or headers:0=Latin,1=HE,2=GR texts, ;note: HE text is keyword ;specification of main language and sublanguage. We use standard Windows ;note: according notes above, primary language of key is Hebrew (= 0x0d) ;if key should NOT be synchronised, use value 1 D4_Headers=6 ;note: we have 6 headers ;here can be used 0-9 headers. Not used can be omitted ;1. header SHOULD be keyword, we use label Word: D4_HeaderType1=0 ;2. header is pronounciation, label is "Pronounc:", visible header, after header is new line and this header is not used for searching D4_HeaderType2=11 ;3. header is Strong#, label is "Strong:", visible header, after header is new line and this header is used for searching D4_HeaderType3=0 ;4. header is origin of the word, label is "Orig:", visible header, after header is new line and this header is not used for searching D4_HeaderType4=0 ;5. header is TWOT number and grammar, label is "Use:", visible header, after header is new line and this header is not used for searching D4_HeaderType5=12
D4_Tags=1 ;yes, we use Greek and Hebrew Strong# tags, see below ;Tag flags: 0=tag not used,1=tag is used and default visible,3=tag is used and default invisible |
D4_JumpInside=1
|
(remember, each single record is on single line, also block below is one line)
|SKאב|Sk|SLאב|Sl|SH0|THאב|Th|Sh0|SH1|TIabe|Ti|Sh1|SH2|RH3|Rh|Sh2|SH3from the same as 24; a green plant:--greenness, fruit. |RH24|Rh|Sh3|SH4 |TRTWOT-1a|Tr Noun Masculine|Sh4|SH5|RG1080|Rg|RG2590|Rg|RG4491|Rg|Sh5|TL 1) freshness, fresh green, green shoots, or greenery |
|SKאב|Sk - Hebrew keyword inserted into |SK|Sk tags. No need to use |TH|Th tags for Hebrew text, because D4_KeyType was set to 1 (Hebrew)
|SLאב|Sl - Label inserted into |SL|Sl tags. This label is inserted into combo box. No need to use |TH|Th tags for Hebrew text, because D4_KeyType was set to 1 (Hebrew)
|SH0|THאב|Th|Sh0 - 1. header, inside |SH0 and |Sh0 tags. Repeat Hebrew keyword, now it must be inside |TH and |Th tags for switch text to Hebrew
|SH1|TIabe|Ti|Sh1 - 2. header, inside |SH1 and |Sh1 tags, pronunciations. We use tags for italic |TI and |Ti
|SH2|RH3|Rh|Sh2 - 3. header, inside |SH2 and |Sh2 tags. Hebrew Strong# 3: |RH3|Rh
|SH3from the same as 24; a green plant:--greenness, fruit. |RH24|Rh|Sh3 - 4. header, inside |SH3 and |Sh3 tags, origin of the word.
|SH4 |TRTWOT-1a|Tr Noun Masculine|Sh4 - 5. header, inside |SH4 and |Sh4 tags, grammar. We use raised text tags: |TR and |Tr
|SH5|RG1080|Rg|RG2590|Rg|RG4491|Rg|Sh5 - 6. header, inside |SH5 and |Sh5 tags. Greek Strong# equivalents.
|TL 1) freshness, fresh green, green shoots, or greenery - after inserting of empty line |TL (or |C tag) description follows